package com.ymttest.database.mapping.livetv;

import com.ymttest.database.model.livetv.LiveModel;
import com.ymttest.database.model.livetv.LiveModelExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface LiveModelMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @SelectProvider(type=LiveModelSqlProvider.class, method="countByExample")
    int countByExample(LiveModelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @DeleteProvider(type=LiveModelSqlProvider.class, method="deleteByExample")
    int deleteByExample(LiveModelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @Delete({
        "delete from livemodel",
        "where LiveModelId = #{liveModelId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer liveModelId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @Insert({
        "insert into livemodel (LiveModelId, LiveId, ",
        "ModelId, Action, ",
        "CreateTime, UpdateTime)",
        "values (#{liveModelId,jdbcType=INTEGER}, #{liveId,jdbcType=INTEGER}, ",
        "#{modelId,jdbcType=INTEGER}, #{action,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(LiveModel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @InsertProvider(type=LiveModelSqlProvider.class, method="insertSelective")
    int insertSelective(LiveModel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @SelectProvider(type=LiveModelSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="LiveModelId", property="liveModelId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="LiveId", property="liveId", jdbcType=JdbcType.INTEGER),
        @Result(column="ModelId", property="modelId", jdbcType=JdbcType.INTEGER),
        @Result(column="Action", property="action", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<LiveModel> selectByExample(LiveModelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @Select({
        "select",
        "LiveModelId, LiveId, ModelId, Action, CreateTime, UpdateTime",
        "from livemodel",
        "where LiveModelId = #{liveModelId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="LiveModelId", property="liveModelId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="LiveId", property="liveId", jdbcType=JdbcType.INTEGER),
        @Result(column="ModelId", property="modelId", jdbcType=JdbcType.INTEGER),
        @Result(column="Action", property="action", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    LiveModel selectByPrimaryKey(Integer liveModelId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @UpdateProvider(type=LiveModelSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") LiveModel record, @Param("example") LiveModelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @UpdateProvider(type=LiveModelSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") LiveModel record, @Param("example") LiveModelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @UpdateProvider(type=LiveModelSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(LiveModel record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table livemodel
     *
     * @mbggenerated Tue Oct 20 18:21:06 CST 2020
     */
    @Update({
        "update livemodel",
        "set LiveId = #{liveId,jdbcType=INTEGER},",
          "ModelId = #{modelId,jdbcType=INTEGER},",
          "Action = #{action,jdbcType=INTEGER},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where LiveModelId = #{liveModelId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(LiveModel record);
}